package com.work.biz.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.work.common.core.domain.BaseEntity;

import javax.validation.constraints.NotNull;

/**
 * 作业完成明细对象 biz_work_detail
 *
 * @author lee
 * @date 2021-04-22
 */
@ApiModel
public class BizWorkDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 作业ID
     */
    private Long detailId;

    /**
     * 作业ID
     */
    private Long workId;

    /**
     * 学生ID
     */
    @NotNull(message = "学生ID不能为空")
    @ApiModelProperty(required = true, value = "学生ID")
    private Long studentId;

    /**
     * 作业内容
     */
    private String submitContent;

    /**
     * 完成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date finishTime;

    /**
     * 作业状态（0正常 1关闭）
     */
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    private Long userId;

    private BizStudent student;

    public void setDetailId(Long detailId) {
        this.detailId = detailId;
    }

    public Long getDetailId() {
        return detailId;
    }

    public void setWorkId(Long workId) {
        this.workId = workId;
    }

    public Long getWorkId() {
        return workId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public Long getStudentId() {
        return studentId;
    }

    public void setSubmitContent(String submitContent) {
        this.submitContent = submitContent;
    }

    public String getSubmitContent() {
        return submitContent;
    }

    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }

    public Date getFinishTime() {
        return finishTime;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public BizStudent getStudent() {
        return student;
    }

    public void setStudent(BizStudent student) {
        this.student = student;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("detailId", getDetailId())
                .append("workId", getWorkId())
                .append("studentId", getStudentId())
                .append("submitContent", getSubmitContent())
                .append("finishTime", getFinishTime())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
